<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // on 
        // load加载 
        // window.onload window加载完之后，执行function
        //   html window.document
        window.onload = function () {
            // 1. 获取id是wudalang的元素标签div
            var oDiv = document.getElementById('wudalang');
            console.log('oDiv: ', oDiv);
            console.dir(oDiv); // oDiv元素节点对象展开，看他里面的属性

            // nodeType:1 元素节点
            // nodeName: "DIV" 节点标签名[转大写后的]

            var oSpan = document.getElementById('rapper');
            console.dir(oSpan);
        }

    </script>
</head>

<body>
    <div id="wudalang">我是潘金莲</div>
    <span id="rapper">我是span</span>

</body>

</html>